//-----------------------------------------------------
//
// Utils used by dungeon generator
//
//
//-----------------------------------------------------

#include "global.h"

roominfo *get_roominfo(igraph_t *graph, igraph_integer_t node)
{ 
	roominfo *ri;
	ri = (roominfo *) strtol(igraph_cattribute_VAS(graph, "roominfo", node),NULL,16);
	return ri;

}

int set_roominfo(igraph_t *graph, igraph_integer_t node, roominfo *ri)
{
	char str[20];	
	sprintf(str, "0x%lx", (unsigned long)ri);
	igraph_cattribute_VAS_set(graph, "roominfo", node, str);

	return 0;

}

void graph_init()
{
	igraph_i_set_attribute_table(&igraph_cattribute_table);
}
